package com.cjjd.c.bean.subscribe;

import com.cjjd.c.bean.BaseBean;

import java.util.TreeMap;

/**
 * ----------------------------------
 * Created by xyd on 2017/12/19.
 * <p/>
 * 描  述：
 * <p/>
 * 修订历史:
 * ----------------------------------
 */

public class BookOrderModel extends BaseBean {

   /* hotelName	String	酒店名称
    startDate	String	开始时间
    endDate	String	结束时间
    roomTypeDesc	String	房型类型描述
    prices	TreeMap<String,Double>	时间段内每天的房价，key为日期，value为价格。例如key=2017-11-11，value=200
    totalPrice	double	一间房的总价格
    payType	String	付款方式 0到店或在线 1在线 2到店
    isStorePay	String	是否允许到店付0 不允许 1 允许
    hkGoldNum	int	可用好客币数量
    hkGoldRate	Double	好客币比率 1个好客币=多少人民币。例如0.2*/


    public String hotelName;
    public String startDate;
    public String endDate;
    public String roomTypeDesc;
    public TreeMap<String, String> prices;
    public String totalPrice;
    public String payType;
    public String isStorePay;
    public String hkGoldNum;
    public String hkGoldRate;

    public boolean getIsStorePay() {
        if ("0".endsWith(isStorePay)) {
            return false;
        } else {
            return true;
        }
    }

    public Double getHkGoldNum() {
        double num = 0;

        try {
            num = Double.parseDouble(hkGoldNum);
        } catch (NumberFormatException e) {
            e.printStackTrace();
        }

        return num;
    }
}
